package com.xiangfei.integrateframework.controller;

import com.xiangfei.integrateframework.ResultModel;
import com.xiangfei.integrateframework.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 类名称：
 * 类描述：
 *
 * @author xiangfei
 * 创建时间：2018-09-05 16:09
 */

@RestController
@RequestMapping(value = {"/user"})
public class UserController {

    @Autowired
    private IUserService userService;

    @RequestMapping(value = {"/findAll"},produces = {"application/json;charset=UTF-8"}, method = RequestMethod.GET)
    public Object getAllUsers(){
        List list = userService.findAllUser();
        return new ResultModel(200,list);
    }
}
